package com.java2_23;

public class Student {
    private String name;
    private int age;
    private static String school;

    public Student(){

    }
    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public static String getSchool() {
        return school;
    }

    //静态成员方法可以使用set方法一次修改全部修改
    public static void setSchool(String school) {
        Student.school = school;
    }

    @Override
    public String toString() {
        return name + " " + age + " " + school;
    }
}
